package com.xjgzinfo.usdp.service.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * A DTO for the {@link com.xjgzinfo.usdp.domain.BladeVisualCategory} entity.
 */
@ApiModel(description = "分类 @author  jxw")
public class BladeVisualCategoryDTO implements Serializable {

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /**
     * 分类键值
     */
    @Size(max = 50)
    @ApiModelProperty(value = "分类键值")
    private String categoryKey;

    /**
     * 分类名称
     */
    @Size(max = 64)
    @ApiModelProperty(value = "分类名称")
    private String categoryValue;

    /**
     * 是否已删除
     */
    @NotNull
    @Max(value = 10)
    @ApiModelProperty(value = "是否已删除", required = true)
    private Integer isDeleted = 0;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCategoryKey() {
        return categoryKey;
    }

    public void setCategoryKey(String categoryKey) {
        this.categoryKey = categoryKey;
    }

    public String getCategoryValue() {
        return categoryValue;
    }

    public void setCategoryValue(String categoryValue) {
        this.categoryValue = categoryValue;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof BladeVisualCategoryDTO)) {
            return false;
        }

        return id != null && id.equals(((BladeVisualCategoryDTO) o).id);
    }

    @Override
    public int hashCode() {
        return 31;
    }

    // prettier-ignore
    @Override
    public String toString() {
        return "BladeVisualCategoryDTO{" +
                "id=" + getId() +
                ", categoryKey='" + getCategoryKey() + "'" +
                ", categoryValue='" + getCategoryValue() + "'" +
                ", isDeleted=" + getIsDeleted() +
                "}";
    }
}
